package com.cskaoyan.mapper;

import com.cskaoyan.bean.role.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    long countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<RoleOptionVO> selectRoleOption();


    void insertFirstLevelPermission(@Param("firstPermission") FirstPermission firstPermission);

    void insertSecondLevelPermissions(@Param("secondPermission") SecondPermissions child, @Param("id") String id);

    void insertApi(@Param("ThirdPermission") ThirdPermissions childChild, @Param("id") String id);

    String selectNameById(@Param("roleId") Integer roleId);
}